/* NOTICE
    OpenJaWS - Open Java Weather Station
    
    Copyright (C) 2008 Grant Gardner <grant@lastweekend.com.au>
    
    OpenJaWS is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
NOTICE */

package au.com.lastweekend.openjaws.plugins;

import java.text.SimpleDateFormat;

import au.com.lastweekend.openjaws.api.Readings;
import au.com.lastweekend.openjaws.units.PercentUnit;
import au.com.lastweekend.openjaws.units.PressureUnit;
import au.com.lastweekend.openjaws.units.RainfallUnit;
import au.com.lastweekend.openjaws.units.TemperatureUnit;
import au.com.lastweekend.openjaws.units.WindUnit;

public class ReadingsTestHelper {

    public static final Readings BASIC_READINGS;

    static {
        BASIC_READINGS = new Readings();
        BASIC_READINGS.setRainAbsolute(0, RainfallUnit.MILLIMETRE);
        BASIC_READINGS.getAirPressure().setCurrent(1000.0, PressureUnit.HECTOPASCAL);
        BASIC_READINGS.getIndoorHumidity().setCurrent(50.0, PercentUnit.PERCENT);
        BASIC_READINGS.getIndoorTemperature().setCurrent(20.0, TemperatureUnit.CELSIUS);
        BASIC_READINGS.getOutdoorHumidity().setCurrent(90.0, PercentUnit.PERCENT);
        BASIC_READINGS.getOutdoorTemperature().setCurrent(30.0, TemperatureUnit.CELSIUS);
        BASIC_READINGS.getWindSpeed().setCurrent(5, WindUnit.KILOMETRES_PER_HOUR, 12.5);

    }

    /**
     * 
     * @return a copy of the {@link #BASIC_READINGS}
     */
    public static Readings newReadings() {

        return new Readings(BASIC_READINGS);
    }

    static final SimpleDateFormat DF = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

}
